﻿@model AceMobile.Models.Accessories.Accessory

@{
    ViewBag.Title = "Sửa thông tin thiết bị";    
}
        <h2>Chỉnh sửa thông tin thiết bị</h2>

        <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

        @using (Html.BeginForm()) {
            @Html.ValidationSummary(true)
            <fieldset>
                <legend>Phụ kiện</legend>
                <br />
                @Html.HiddenFor(model => model.ID)

                <div class="editor-label">
                    @Html.LabelFor(model => model.Name)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>

                
                <div class="editor-label">
                    @Html.LabelFor(model => model.Price)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.Price)
                    @Html.ValidationMessageFor(model => model.Price)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.ConciseFeature)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.ConciseFeature)
                    @Html.ValidationMessageFor(model => model.ConciseFeature)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.DetailFeature)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.DetailFeature)
                    @Html.ValidationMessageFor(model => model.DetailFeature)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.ImageUrl)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.ImageUrl)
                    @Html.ValidationMessageFor(model => model.ImageUrl)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.ManufacturingDate)
                </div>
                <div class="editor-field">
                    <input type="text" id="datepicker" name="ManufacturingDate" value="@Model.ManufacturingDate" />                    
                    @Html.ValidationMessageFor(model => model.ManufacturingDate)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.MadeIn)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.MadeIn)
                    @Html.ValidationMessageFor(model => model.MadeIn)
                </div>            
                <div class="editor-label">
                    @Html.LabelFor(model => model.AccessoryProducer)
                </div>
                <div class="editor-field">
                    @Html.DropDownList("AccessoryProducerID")
                </div>
                <p>
                    <input type="submit" value="Lưu lại thay đổi" />
                </p>
            </fieldset>
        }

        <p >
            @Html.ActionLink("Trở lại danh sách", "Index")
        </p>
        